package com.googlecode.chigs.web.admin.user;

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.StringResourceModel;

import com.googlecode.chigs.domain.User;

public class PermissionsPanel extends Panel {
	public PermissionsPanel(String id, IModel<User> model) {
		super(id, model);

		StringResourceModel lAdm = new StringResourceModel("admin.label", PermissionsPanel.this, null);
		add(new Label("admin.label", lAdm));
		add(new CheckBox("admin").setLabel(lAdm));
		
		StringResourceModel lEnabled = new StringResourceModel("enabled.label", PermissionsPanel.this, null);
		add(new Label("enabled.label", lEnabled));
		add(new CheckBox("enabled").setLabel(lEnabled));

		StringResourceModel lActivation = new StringResourceModel("activationKey.label", PermissionsPanel.this, null);
		add(new Label("activationKey.label", lActivation));
		add(new TextField<String>("activationKey").setLabel(lActivation).setEnabled(false));
	}
}